<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul>
        <!-- li标签 -->
        <li>1</li>
        <li id="li2" class="abc">2</li>
        <li>3</li>
        <li>4</li>
    </ul>
    <script>
        /* 删除 */
        var ul = document.querySelector("ul")
        // ul.remove();//我凶起来,把自己的都删了
        // ul.parentElement.remove();//删掉爹
        // ul.parentElement.parentElement.remove();//删除爷爷
        // console.log(ul.parentElement.parentElement.parentNode);//#document
    </script>
</body>
</html>